package vaccine.appointment.system.inventory.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vaccine.appointment.system.common.annotation.AutoWrapResult;
import vaccine.appointment.system.inventory.dataobject.Inventory;
import vaccine.appointment.system.inventory.service.InventoryService;

/**
 * 库存控制器
 */
@AutoWrapResult
@RequestMapping("/inventory")
@RestController
public class InventoryController {
    @Autowired
    private InventoryService inventoryService;

    public Boolean add(Inventory inventory) {
        return inventoryService.add(inventory);
    }

    public Boolean delete(Integer id) {
        return inventoryService.delete(id);
    }

    public Boolean update(Inventory inventory) {
        return inventoryService.update(inventory);
    }

    public Inventory selectById(Integer id) {
        return inventoryService.selectById(id);
    }
}
